# -*- shell-script -*- 
 
# Demonstration of the init-platform functionality 
 
# This script fragment is sourced by /etc/init.d/init-arch.sh, which 
# in turn executes the init_platform_pre_arch() and 
# init_platform_post_arch() functions. 
 
# A machine can use this feature to run any early boot scripts needed 
# by the machine.  A typical usage would be to initialize specific 
# hardware devices. 
 
# Use this function to perform any post-initializations or clean-up. 
# This function executes after the architecture initializations. 
init_platform_post_arch() 
{ 
    echo "Running Celestica Seastone platform init post_arch routines..." 
	# /dev/cpld device node
	major=`cat /proc/devices | awk '{if($2 == "cpld") print $1}'`
	if [ "$major" == "" ]; then
	  echo "Can't find the cpld device!"
	  exit 1
	fi

	rm -f /dev/cpld
	mknod -m 666 /dev/cpld c $major 0
} 
